package com.xinqi.modules.sys.rotation.dto.req;

import com.xinqi.common.base.enums.YesNoNumberEnum;
import com.xinqi.common.core.enums.RotationImagePositionEnum;
import com.xinqi.common.core.enums.RotationImageTypeEnum;
import com.xinqi.common.green.annotation.Text;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 系统轮播图-请求对象-新增
 *
 * @author: yyzhenn
 * @date: 2023/04/23
 */
@Data
@Schema(description = "系统轮播图-请求对象-新增")
public class RotationImageCreateDTO implements Serializable {

    /**
     * 类型，PC、APP
     */
    @NotNull(message = "{rotation.image.type.not.blank}")
    @Schema(description = "类型，PC、APP", example = "")
    private RotationImageTypeEnum type;
    /**
     * 轮播位置
     */
    @NotNull(message = "{rotation.image.position.not.blank}")
    @Schema(description = "轮播位置", example = "")
    private RotationImagePositionEnum position;
    /**
     * 用户角色
     */
    @NotNull(message = "{rotation.image.position.not.blank}")
    @Schema(description = "用户角色（字典表 -- sys_identity）", example = "1")
    private Integer userRole;
    /**
     * 名称
     */
    @Text
    @NotEmpty(message = "{rotation.image.name.not.blank}")
    @Size(min = 0, max = 15, message = "{rotation.image.name.length.valid}")
    @Schema(description = "名称", example = "")
    private String name;
    /**
     * 图片
     */
    @NotEmpty(message = "{rotation.image.image.not.blank}")
    @Schema(description = "图片", example = "")
    private String image;
    /**
     * 跳转链接
     */
    @NotEmpty(message = "{rotation.image.url.not.blank}")
    @Schema(description = "跳转链接", example = "")
    private String url;
    /**
     * 排序
     */
    @NotNull(message = "{rotation.image.sort.not.blank}")
    @Schema(description = "排序", example = "")
    private Integer sort;
    /**
     * 状态，0-禁用；1-启动
     */
    @NotNull(message = "{rotation.image.enableStatus.not.blank}")
    @Schema(description = "状态，0-禁用；1-启动", example = "")
    private YesNoNumberEnum enableStatus;
    /**
     * 备注
     */
    @Text
    @Size(min = 0, max = 100, message = "{rotation.image.remark.length.valid}")
    @Schema(description = "备注", example = "")
    private String remark;
}
